Health Cloud Clinical System API - Implementation Template
Developer guide
Clinical Dev Guide
The US-Core Clinical application uses the following DataWeave modules to map between Health Cloud and FHIR formats.
Module | Description |
---|---|
allergyintolerancefhirtools | allergyintolerancefhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
allergyintoleranceRequest | This module defines functions needed to convert a FHIR AllergyIntolerance resource into it's representation within Health Cloud. |
conditionfhirtools | conditionfhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
conditionRequest | This module defines functions needed to convert a FHIR Condition resource into it's representation within Health Cloud. |
procedurefhirtools | procedurefhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
procedureRequest | This module defines functions needed to convert a FHIR Procedure resource into it's representation within Health Cloud. |
servicerequestfhirtools | servicerequestfhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
servicerequestRequest | This module defines functions needed to convert a FHIR ServiceRequest resource into it's representation within Health Cloud. |
Util | A library with needed dataweave utility functions. |
allergyintolerancefhirtools
allergyintolerancefhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/AllergyIntolerance/allergyintolerancefhirtools.dwl
Functions
fun getAllergyIntoleranceResponse (allergyIntolerance, searchLookupResponse)
Generates the FHIR response with the provided AllergyIntolerance Object.
param
allergyIntolerance
is input AllergyIntolerance request.
paramsearchLookupResponse
is the lookup response for codeableconcept.
return A Health Cloud AllergyIntolerance response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | AllergyIntolerance | Id | AllergyIntolerance Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
clinicalStatus.coding.code | AllergyIntolerance | Status | Preferred value set for AllergyIntolerance Clinical Status |
verificationStatus.coding.code | AllergyIntolerance | VerificationStatus | Preferred value set for AllergyIntolerance Verification Status |
type | AllergyIntolerance | Type | Identification of the underlying physiological mechanism for a Reaction Risk |
category | AllergyIntolerance | Category | Category of an identified substance associated with allergies or intolerances |
criticality | AllergyIntolerance | Severity | Estimate of the potential clinical harm or seriousness |
code.coding.code | AllergyIntolerance | CodeId | Code that identifies the allergy or intolerance |
patient.reference | AllergyIntolerance | PatientId | Patient reference |
encounter.reference | AllergyIntolerance | ClinicalEncounterId | Encounter when the allergy or intolerance was asserted |
onset.onsetDateTime | AllergyIntolerance | OnsetStartDateTime | Onset DateTime |
recordedDate | AllergyIntolerance | RecordCreationDateTime | Date first version of the resource instance was recorded |
recorder.reference | AllergyIntolerance | RecordCreatorId | Who recorded the sensitivity |
asserter.reference | AllergyIntolerance | AssertionSourceId | Source of the information about the allergy |
lastOccurrence | AllergyIntolerance | LastOccurenceDateTime | Date(or time) of last known occurrence of a reaction |
reaction.substance.coding.code | PatientHealthReaction | CausativeSubstanceId | Specific substance considered to be responsible for event |
reaction.manifestation.coding.code | PatientHealthReaction | ManifestedSymptomId | Clinical symptoms or signs associated with the Event |
reaction.description | PatientHealthReaction | Details | Description of the event as a whole |
reaction.onset.onsetDateTime | PatientHealthReaction | ReactionDateTime | Date(or time) when manifestations showed |
reaction.severity | PatientHealthReaction | Severity | Clinical assessment of the severity of a reaction event |
reaction.exposureRoute.coding.code | PatientHealthReaction | ExposureRouteId | How the subject was exposed to the substance |
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
allergyintoleranceRequest
This module defines functions needed to convert a
FHIR AllergyIntolerance resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/AllergyIntolerance/allergyintoleranceRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getCodeSetUpsert (codeSetList)
Converts the provided AllergyIntolerance FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getPickListValue (inputValue, lookupValue)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field, lookupReq is from FHIRCodeSetc. return_ value for the picklist field.
fun getAllergyIntoleranceUpsert (fhirObj, codeSetBundleList, upsertLookupResponse)
Converts the provided AllergyIntolerance FHIR object to the Health Cloud AllergyIntolerance object.
param
fhirObj
is a FHIR AllergyIntolerance object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the AllergyIntolerance object
return Health Cloud AllergyIntolerance upsert fields.
fun getAllergyIntoleranceUpdate (fhirObj, codeSetBundleList, upsertLookupResponse)
Converts the provided AllergyIntolerance FHIR object to the Health Cloud AllergyIntolerance object.
param
fhirObj
is a FHIR AllergyIntolerance object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the AllergyIntolerance object
return Health Cloud AllergyIntolerance update fields.
fun getPatientHealthReactionUpsert (reactionFhirObj, allergyIntoleranceId, codeSetBundleList, rIndex)
Converts the provided AllergyIntolerance (Reaction) FHIR object to the Health Cloud PatientHealthReaction object.
param
reactionFhirObj
is a FHIR AllergyIntolerance (Reaction) object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the AllergyIntoleranceReactions object
return Health Cloud PatientHealthReaction upsert fields.
fun getIdentifierUpsert (identifier, allergyIntoleranceId, typeId)
Converts the provided AllergyIntolerance FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramallergyIntoleranceId
is the associated allergyIntolerance Id
return Health Cloud Identifier upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided AllergyIntolerance FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
parambundleType
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
conditionfhirtools
conditionfhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Condition/conditionfhirtools.dwl
Functions
fun getConditionResponse (condition, searchLookupResponse)
Generates the FHIR response with the provided Condition Object.
param
condition
is the input condition object.
paramsearchLookupResponse
is the lookup response from FHIR Codesets object.
return A Health Cloud Condition response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | HealthCondition | Id | Condition Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
clinicalStatus.coding.code | ConditionStatus | HealthCondition | Preferred value set for Condition Clinical Status |
verificationStatus.coding.code | DiagnosticStatus | HealthCondition | The verification status to support the clinical status of the condition |
category.coding.code | Type | HealthCondition | Preferred value set for Condition Categories |
severity.coding.code | Severity | HealthCondition | Subjective severity of condition |
code.coding.code | ConditionCodeId | HealthCondition | Identification of the condition or diagnosis |
bodySite.coding.code | SiteId | HealthCondition | Anatomical location |
subject.reference | PatientId | HealthCondition | Reference of Patient |
encounter.reference | ClinicalEncounterId | HealthCondition | Encounter reference |
onset.onsetDateTime | OnsetStartDateTime | HealthCondition | Estimated or actual date |
abatement.abatementDateTime | AbatementStartDateTime | HealthCondition | When in resolution or remission |
recordedDate | RecordCreationDateTime | HealthCondition | Date record was first recorded |
recorder.reference | RecordCreatorId | HealthCondition | Who recorded the condition |
asserter.reference | AssertionSourceId | HealthCondition | Person who asserts this condition |
stage.summary.coding.code | StageId | HealthCondition | Simple summary |
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
conditionRequest
This module defines functions needed to convert a
FHIR Condition resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Condition/conditionRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getPickListValue (inputValue, lookupValue)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field, lookupReq is from FHIRCodeSetc. return_ value for the picklist field.
fun getCodeSetUpsert (codeSetList)
Converts the provided Condition FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getConditionUpsert (fhirObj, codeSetBundleList, upsertLookupResponse)
Converts the provided Condition FHIR object to the Health Cloud Condition object.
param
fhirObj
is a FHIR Condition object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Condition object
return Health Cloud Condition upsert fields.
fun getConditionUpdate (fhirObj, codeSetBundleList, upsertLookupResponse)
Converts the provided Condition FHIR object to the Health Cloud Condition object.
param
fhirObj
is a FHIR Condition object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Condition object
return Health Cloud Condition update fields.
fun getIdentifierUpsert (identifier, conditionId, typeId)
Converts the provided Condition FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramencounterId
is the associated condition Id
return Health Cloud Identifier upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Condition FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
procedurefhirtools
procedurefhirtools DataWeave library contains functions used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Procedure/procedurefhirtools.dwl
Functions
fun getProcedureResponse (procedure, searchLookupResponse)
Generates the FHIR response with the provided Encounter Object.
param
procedure
is the Procedure object to map.
paramsearchLookupResponse
is codeableConcept to picklist lookup response.
return A Health Cloud Procedure response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Procedure | Id | Procedure Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
basedOn.reference | PatientMedicalProcedureDetail | DetailRecordId | A request for this procedure |
partOf.reference | PatientMedicalProcedureDetail | DetailRecordId | Part of referenced event |
statusReason.coding.system | PatientMedicalProcedure | SourceSystem | Identity of the terminology system |
statusReason.coding.version | PatientMedicalProcedure | SystemVersion | Version of the system - if relevant |
statusReason.coding.code | PatientMedicalProcedure | StatusReasonCodeId | Reason code for current status |
statusReason.coding.display | PatientMedicalProcedure | Name | Representation defined by the system |
category.coding.system | PatientMedicalProcedure | SourceSystem | Identity of the terminology system |
category.coding.version | PatientMedicalProcedure | SystemVersion | Version of the system - if relevant |
category.coding.code | PatientMedicalProcedure | TypeId | Classification of the procedure |
category.coding.display | PatientMedicalProcedure | Name | Representation defined by the system |
code.coding.system | PatientMedicalProcedure | SourceSystem | Identity of the terminology system |
code.coding.version | PatientMedicalProcedure | SystemVersion | Version of the system - if relevant |
code.coding.code | PatientMedicalProcedure | CodeId | Identification of the procedure |
code.coding.display | PatientMedicalProcedure | Name | Representation defined by the system |
subject.reference | PatientMedicalProcedure | PatientId | Who the procedure was performed on |
encounter.reference | PatientMedicalProcedure | ClinicalEncounterId | Encounter created as part of |
performedDateTime | PatientMedicalProcedure | StartDate | Procedure performed date |
recorder | PatientMedicalProcedure | RecordCreatorId | Who recorded the procedure |
asserter | PatientMedicalProcedure | AssertionSourceId | Person who asserts this procedure |
performer.function.coding.system | CarePerformer | SourceSystem | Identity of the terminology system |
performer.function.coding.version | CarePerformer | SystemVersion | Version of the system - if relevant |
performer.function.coding.code | CarePerformer | RoleId | Type of performance |
performer.function.coding.display | CarePerformer | Name | Representation defined by the system |
performer.actor.reference | CarePerformer | PersonId | The reference to the practitioner |
performer.onBehalfOf.reference | CarePerformer | AffiliatedOrganizationId | Organization the device or practitioner was acting for |
location.reference | PatientMedicalProcedure | FacilityId | Where the procedure happened |
reasonCode.coding.system | PatientMedicalProcedure | SourceSystem | Identity of the terminology system |
reasonCode.coding.version | PatientMedicalProcedure | SystemVersion | Version of the system - if relevant |
reasonCode.coding.code | PatientMedicalProcedure | ReasonCodeId | Coded reason procedure performed |
reasonCode.coding.display | PatientMedicalProcedure | Name | Representation defined by the system |
reasonReference.reference | PatientMedicalProcedure | ReasonReferenceId | The justification that the procedure was performed |
bodySite.coding.system | PatientMedicalProcedureDetail | SourceSystem | Identity of the terminology system |
bodySite.coding.version | PatientMedicalProcedureDetail | SystemVersion | Version of the system - if relevant |
bodySite.coding.code | PatientMedicalProcedureDetail | DetailCodeId | Target body sites |
bodySite.coding.display | PatientMedicalProcedureDetail | Name | Representation defined by the system |
outcome.coding.code | PatientMedicalProcedure | Outcome | The result of procedure |
report.reference | PatientMedicalProcedure | ReportId | Any report resulting from the procedure |
complication.coding.system | PatientMedicalProcedureDetail | SourceSystem | Identity of the terminology system |
complication.coding.version | PatientMedicalProcedureDetail | SystemVersion | Version of the system - if relevant |
complication.coding.code | PatientMedicalProcedureDetail | DetailCodeId | Complication following the procedure |
complication.coding.display | PatientMedicalProcedureDetail | Name | Representation defined by the system |
complicationDetail.coding.system | PatientMedicalProcedureDetail | SourceSystem | Identity of the terminology system |
complicationDetail.coding.version | PatientMedicalProcedureDetail | SystemVersion | Version of the system - if relevant |
complicationDetail.coding.code | PatientMedicalProcedureDetail | DetailRecordId | A condition that is a result of the procedure |
complicationDetail.coding.display | PatientMedicalProcedureDetail | Name | Representation defined by the system |
followUp.coding.system | PatientMedicalProcedureDetail | SourceSystem | Identity of the terminology system |
followUp.coding.version | PatientMedicalProcedureDetail | SystemVersion | Version of the system - if relevant |
followUp.coding.code | PatientMedicalProcedureDetail | DetailCodeId | Instructions for follow up |
followUp.coding.display | PatientMedicalProcedureDetail | Name | Representation defined by the system |
note.text | AuthorNote | NoteText | Additional information about the procedure |
focalDevice.action.coding.code | PatientMedicalProcedureDetail | DetailRecordId | Kind of change to device |
usedCode.coding.code | PatientMedicalProcedureDetail | DetailCodeId | Coded items used during the procedure |
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
procedureRequest
This module defines functions needed to convert a
FHIR Procedure resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Procedure/procedureRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getCodeSetUpsert (codeSetList)
Converts the provided Procedure FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getPatientMedicalProcedureUpsert (fhirObj, codeSetBundleList, upsertLookupResponse)
Converts the provided Procedure FHIR object to the Health Cloud PatientMedicalProcedure object.
param
fhirObj
is a FHIR Procedure object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Procedure object
return Health Cloud PatientMedicalProcedure upsert fields.
fun getPatientMedicalProcedureUpdate (fhirObj, codeSetBundleList, upsertLookupResponse)
Converts the provided Procedure FHIR object to the Health Cloud PatientMedicalProcedure object.
param
fhirObj
is a FHIR Procedure object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Procedure object
return Health Cloud PatientMedicalProcedure update fields.
fun getPatientMedicalProcedureDetailUpsert (procedureId, procedureDetail)
Converts the provided Procedure FHIR object to the Health Cloud PatientMedicalProcedureDetail object.
param
procedureId
is the associated Procedure Id
paramprocedureDetail
is the list of Procedure Detail in Procedure FHIR object
return Health Cloud PatientMedicalProcedureDetails upsert fields.
fun getCarePerformerUpsert (procedureId, performer, codeSetBundleList)
Converts the provided Procedure FHIR object to the Health Cloud CarePerformer object.
param
procedureId
is the associated Procedure Id
paramperformer
is Perfromer object of Procedure FHIR object
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Procedure object
return Health Cloud PatientMedicalProcedureDetails upsert fields.
fun getIdentifierUpsert (identifier, procedureId, typeId)
Converts the provided Procedure FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramprocedureId
is the associated Procedure Id
paramtypeId
is the codeSetId
return Health Cloud Identifier upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Procedure FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
servicerequestfhirtools
servicerequestfhirtools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/ServiceRequest/servicerequestfhirtools.dwl
Functions
fun getServiceRequestResponse (req, searchLookupResponse, serviceRequestDetails, unitOfMeasureCode)
Generates the FHIR response with the provided ServiceRequest Object.
param
req
is the ServiceRequest request.
paramsearchLookupResponse
is the lookup response for CodeableConcept.
paramserviceRequestDetails
is a list of ClinicalServiceRequestDetail objects associated with the service request.
paramunitOfMeasureCode
is the unit of measure code if found.
return A FHIR ServiceRequest response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
identifier.use | Identifier | IdUsageType | usual | official | temp | secondary | old | ||||
identifier.system | Identifier | SourceSystem | The namespace for the identifier. | ||||||||
identifier.value | Identifier | IdValue | The identifier value. | ||||||||
identifier.type.coding.code | Identifier | IDTypeId | Description of the identifier. | ||||||||
identifier.period.start | Identifier | EffectiveDate | The period when the ID is valid start value. | ||||||||
identifier.period.end | Identifier | EndDate | The period when the ID is valid end value. | ||||||||
identifier.assigner | Identifier | IssuingAuthorityId | The organization that issued the ID. | ||||||||
basedOn | ClinicalServiceRequestDetail | DetailRecordId | What the ServiceRequest fulfills. | ||||||||
replaces | ClinicalServiceRequest | OriginalRequestId | What the ServiceRequest replaces. | ||||||||
requisition.identifier.use | Identifier | IdUsageType | usual | official | temp | secondary | old | ||||
requisition.identifier.system | Identifier | SourceSystem | The namespace for the identifier. | ||||||||
requisition.identifier.value | Identifier | IdValue | The identifier value. | ||||||||
requisition.identifier.type.coding.code | Identifier | IDTypeId | Description of the identifier. | ||||||||
requisition.identifier.period.start | Identifier | EffectiveDate | The period when the ID is valid start value. | ||||||||
requisition.identifier.period.end | Identifier | EndDate | The period when the ID is valid end value. | ||||||||
requisition.identifier.assigner | Identifier | IssuingAuthorityId | The organization that issued the ID. | ||||||||
status | ClinicalServiceRequest | Status | draft | active | on-hold | revoked | completed | entered-in-error | unknown | ||
intent | ClinicalServiceRequest | Type | proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option |
category.coding.code | ClinicalServiceRequest | CategoryId | The classification of service. | ||||||||
priority | ClinicalServiceRequest | Priority | routine | urgent | asap | stat | |||||
doNotPerform | ClinicalServiceRequest | IsIgnored | This is set to true if the service or procedure shoudn't be performed. | ||||||||
code.coding.code | ClinicalServiceRequest | RequestCodeId | What is being requested or ordered. | ||||||||
quantityQuantity.value | ClinicalServiceRequest | QuantityNumerator | The service amount value. | ||||||||
quantityQuantity.unit | ClinicalServiceRequest | QuantityNumeratorUnitId | The service amount unit. | ||||||||
quantityRatio.numerator.value | ClinicalServiceRequest | QuantityNumerator | The service amount numerator value. | ||||||||
quantityRatio.denominator.value | ClinicalServiceRequest | QuantityDenominator | The service amount denominator value. | ||||||||
quantityRatio.numerator.unit | ClinicalServiceRequest | QuantityNumeratorUnitId | The service amount numerator unit. | ||||||||
quantityRange.high.value | ClinicalServiceRequest | QuantityNumerator | The service amount high value. | ||||||||
quantityRange.low.value | ClinicalServiceRequest | QuantityDenominator | The service amount low value. | ||||||||
quantityRange.high.unit | ClinicalServiceRequest | QuantityNumeratorUnitId | The service amount high unit. | ||||||||
subject | ClinicalServiceRequest | PatientId | The patient the service is ordered. | ||||||||
encounter | ClinicalServiceRequest | EncounterId | The encounter the service is ordered for. | ||||||||
occurrencePeriod.start | ClinicalServiceRequest | StartDate | When the service will occur start. | ||||||||
occurrencePeriod.end | ClinicalServiceRequest | EndDate | When the service will occur end. | ||||||||
occurrenceDateTime | ClinicalServiceRequest | StartDate | When the service will occur start. | ||||||||
asNeededBoolean | ClinicalServiceRequest | HasPrerequisites | Preconditions of the service boolean. | ||||||||
asNeededCodeableConcept.coding.code | ClinicalServiceRequest | PrerequisiteCodeId | Preconditions of the service CodeableConcept. | ||||||||
authoredOn | ClinicalServiceRequest | DateSigned | The date the request was created. | ||||||||
requester | ClinicalServiceRequest | RequesterId | The requester of the service request. | ||||||||
performerType.coding.code | ClinicalServiceRequest | PerformerTypeId | The role of the performer. | ||||||||
performer | ClinicalServiceRequest | PerformerId | The requester of the service request. | ||||||||
locationCode.coding.code | ClinicalServiceRequest | FacilityCodeId | The service request location code. | ||||||||
locationReference | ClinicalServiceRequest | FacilityId | The service request location reference. | ||||||||
reasonCode.coding.code | ClinicalServiceRequest | ReasonCodeId | The justification for the service request code. | ||||||||
reasonReference | ClinicalServiceRequest | DiagnosticReportId | The justification of the service request reference. | ||||||||
bodySite.coding.code | ClinicalServiceRequestDetail | DetailCodeId | The location on the body. | ||||||||
patientInstruction | ClinicalServiceRequest | PatientInstruction | The patient instructions. |
fun getBasedOn (serviceRequestDetails)
Gets the ServiceRequest basedOn list with the provided list of ClinicalServiceRequestDetail objects.
param
serviceRequestDetails
is a list of ClinicalServiceRequestDetail objects.
return A list of references for the basedOn field or an empty list.
fun getBodySite (serviceRequestDetails)
Gets the ServiceRequest bodySite list with the provided list of ClinicalServiceRequestDetail objects.
param
serviceRequestDetails
is a list of ClinicalServiceRequestDetail objects.
return A list of CodeableConcept objects for the bodySite field or an empty list.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
servicerequestRequest
This module defines functions needed to convert a
FHIR ServiceRequest resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/ServiceRequest/servicerequestRequest.dwl
Functions
fun getServiceRequestUpsert (fhirObj, codeSetBundleList, unitOfMasureId, update)
Converts the provided ServiceRequest FHIR object to the Health Cloud ClinicalServiceRequest object.
param
fhirObj
is a FHIR ServiceRequest object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the ServiceRequest object
paramunitOfMasureId
is a String with the unit of measure Id for QuantityNumeratorUnitId.
paramupdate
is a boolean with true to for an update request and false for not.
return Health Cloud ClinicalServiceRequest upsert fields.
fun getClinicalServiceRequestDetailBasedOnUpsert (basedOn, clinicalServiceRequestId)
Converts the provided ServiceRequest FHIR object to the Health Cloud ClinicalServiceRequestDetail for basedOn object.
param
basedOn
is a FHIR basedOn object.
paramclinicalServiceRequestId
is the parent ClinicalServiceRequest Id.
return Health Cloud ClinicalServiceRequestDetail upsert fields.
fun getClinicalServiceRequestDetailBodySiteUpsert (clinicalServiceRequestId, bodySiteIndex, codeSetBundleList)
Converts the provided ServiceRequest FHIR object to the Health Cloud ClinicalServiceRequestDetail for bodySite object.
param
clinicalServiceRequestId
is the parent ClinicalServiceRequest Id.
parambodySiteIndex
is the index of the FHIR bodySite being produced.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the ServiceRequest object.
return Health Cloud ClinicalServiceRequestDetail upsert fields.
Util
A library with needed dataweave utility functions.
Source:
.src/main/resources/dwl/Util.dwl
Functions
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
obj
is an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arr
is an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arr
is an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
obj
is an object.
return An object with null values removed.